{template 'common/header'}
  <link rel="stylesheet" href="{$murl}css/style.css">

  <link rel="stylesheet" href="{$murl}css/prism.css">

  <link rel="stylesheet" href="{$murl}css/chosen.css">
  <style>
  	.chzn-container-single .chzn-single div b {background: url('{$murl}/images/chosen-sprite.png') no-repeat 0 1px;}
  	.chzn-container-single .chzn-search input {
	  background: #fff url('chosen-sprite.png') no-repeat 100% -20px;
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat 100% -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
	  }
	.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
	  background: url({$murl}/images/chosen-sprite.png) right top no-repeat;
	}
	.chzn-rtl .chzn-search input {
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, #ffffff;
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);  
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%);
	  background: url('{$murl}/images/chosen-sprite.png') no-repeat -38px -20px, linear-gradient(top, #ffffff 85%,#eeeeee 99%);
	}
  </style>
<form action="" method="post" class="form-horizontal form" onsubmit="beforesubmit()"
	enctype="multipart/form-data">
	<div class="form-group">
		<div class="input-group">
			<span class="input-group-addon">积分名称</span> <input type="text"
				name="pointname" class="form-control"
				value="{$settings['pointname']}">
		</div>
	</div>
	<div class="form-group">
		<div class="input-group">
			<span class="input-group-addon">积分商城链接：</span> <input type="text"
				name="pointshoplink" placeholder="http://开头" class="form-control"
				value="{$settings['pointshoplink']}">
		</div>
	</div>
	<div class="form-group">
		<div class="input-group">
			<span class="input-group-addon">关联活动：</span>
			<select id="signactid" data-placeholder="活动名称" multiple class="chosen-select-width form-control" tabindex="16">

	            <option value=""></option>
				{loop $activitylist $key $item}
	            <option value="{$item['id']}" 
		            {loop $signactidarr $signactid}
		            	{if $item['id']==$signactid}
		            		selected="selected"
		            	{/if}
		            {/loop}>
	            {$item['name']}
	            </option>
				{/loop}
          	</select>	
          	<input type="hidden" class="signactid" name="signactid" value=""/>	
		</div>
	</div>
	<div class="form-group">
		<div class="input-group">
			
			<input type="submit" name="submit" class="btn btn-primary" value="提交" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>
	</div>
</form>
  	<script src="{$murl}js/chosen.jquery.js" type="text/javascript"></script>

  	<script src="{$murl}js/prism.js" type="text/javascript" charset="utf-8"></script>

  	<script type="text/javascript">

	    var config = {
	
	      '.chosen-select'           : {},
	
	      '.chosen-select-deselect'  : {allow_single_deselect:true},
	
	      '.chosen-select-no-single' : {disable_search_threshold:10},
	
	      '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
	
	      '.chosen-select-width'     : {width:"95%"}
	
	    }
	
	    for (var selector in config) {
	
	      $(selector).chosen(config[selector]);
	
	    }

  	</script>
	<script type="text/javascript">
	    function beforesubmit(){
	    	var activitystr = '';
	    	var activityarr = $('#signactid').val();
	    	for(var item in activityarr){
	    		if(item!=0){
	    			activitystr+=',';
	    		}
	    		activitystr+=activityarr[item];
	    	}
	    	$(".signactid").val(activitystr.toString());
	    }
	</script>
{template 'common/footer'}
